package com.itheima;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.itheima.dao.UserDao;
import com.itheima.pojo.User;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.ArrayList;
import java.util.List;

@SpringBootTest
public class MpUpdateVersion {
    @Autowired
    private UserDao userDao;

    //乐观锁
    @Test
    void test1(){
        System.out.println("查询用户");
        User user = userDao.selectById(1L);
        System.out.println(user);
        System.out.println("-----修改----");
        user.setName("无语");
        userDao.updateById(user);
    }
}
